﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace T05class
{
    class Program
    {
        static void Main(string[] args)
        {
            Book b1 = new Book();
            b1.bookName = "平凡的世界";
            b1.page = 345;
            b1.price = 34.0;
            
            
            Console.WriteLine("{0}共{1}页，价格{2}元", b1.bookName, b1.page, b1.price);
            
            Book b2 = b1;//b1与b2指向同一个内存区域
            b2.price = 100.0;
            Console.WriteLine("{0}共{1}页，价格{2}元", b1.bookName, b1.page, b1.price);
            Console.ReadKey();
        }
    
}
/// <summary>
/// Book类： 用于描述系统中数据库实体类
/// </summary>
class Book
{
    public String bookName;
    public int page;
    public double price; }
}
